﻿/*
**  引擎基本系统参数
*/
$.Engine.Settings = {};
$.Engine.Settings.USHRT_MAX = 0x0000ffff;
$.Engine.Settings.pi = Math.PI;
$.Engine.Settings.massUnitsPerKilogram = 1.0;
$.Engine.Settings.timeUnitsPerSecond = 1.0;
$.Engine.Settings.lengthUnitsPerMeter = 30.0;
$.Engine.Settings.maxManifoldPoints = 2;
$.Engine.Settings.maxShapesPerBody = 64;
$.Engine.Settings.maxPolyVertices = 8;
$.Engine.Settings.maxProxies = 1024;
$.Engine.Settings.maxPairs = 8 * $.Engine.Settings.maxProxies;
$.Engine.Settings.linearSlop = 0.005 * $.Engine.Settings.lengthUnitsPerMeter;
$.Engine.Settings.angularSlop = 2.0 / 180.0 * $.Engine.Settings.pi;
$.Engine.Settings.velocityThreshold = 1.0 * $.Engine.Settings.lengthUnitsPerMeter / $.Engine.Settings.timeUnitsPerSecond;
$.Engine.Settings.maxLinearCorrection = 0.2 * $.Engine.Settings.lengthUnitsPerMeter;
$.Engine.Settings.maxAngularCorrection = 8.0 / 180.0 * $.Engine.Settings.pi;
$.Engine.Settings.contactBaumgarte = 0.2;
$.Engine.Settings.timeToSleep = 0.5 * $.Engine.Settings.timeUnitsPerSecond;
$.Engine.Settings.linearSleepTolerance = 0.01 * $.Engine.Settings.lengthUnitsPerMeter / $.Engine.Settings.timeUnitsPerSecond;
$.Engine.Settings.angularSleepTolerance = 2.0 / 180.0 / $.Engine.Settings.timeUnitsPerSecond;

$.Engine.Settings.Assert = function (a) {
  if (!a) {
    var nullVec;
    nullVec.x++;
  }
};